package com.lou1052.data.demo.entities.commom;

import com.lou1052.data.demo.entities.EntityNames;

import java.util.Date;

/**
 * Created by liuqing on 2016/11/20.
 */
@org.springframework.data.elasticsearch.annotations.Document(indexName = EntityNames.USER_ENTITY_NAME ,type = EntityNames.USER_ENTITY_NAME)
@org.springframework.data.mongodb.core.mapping.Document(collection = EntityNames.USER_ENTITY_NAME)
@javax.persistence.Entity(name = EntityNames.USER_ENTITY_NAME)
public class User {
    private Long id;

    private String name;

    private Integer age;

    private String phone;

    private Date addTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", phone='" + phone + '\'' +
                ", addTime=" + addTime +
                '}';
    }
}
